﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RequirementAndBug.Common.Entities
{
    /// <summary>
    /// 结果编号
    /// </summary>
    public class RT
    {
        /// <summary>
        /// 成功
        /// </summary>
        public static readonly RTDetail Success = new RTDetail("请求成功",1);
        /// <summary>
        /// 执行失败
        /// </summary>
        public static readonly RTDetail NoSuccess = new RTDetail("请求失败", 0);
        /// <summary>
        /// 通用异常
        /// </summary>
        public static readonly RTDetail Error = new RTDetail("请求异常", -1);
    }

    public class RTDetail
    {
        public RTDetail(string msg, int code)
        {
            this.Msg = msg;
            this.Code = code;
        }

        public string Msg
        {
            get;
            set;
        }
        public int Code
        {
            get;
            set;
        }
    }
}
